﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpages/Main.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="EditContract.aspx.cs" Inherits="User_Employer_EditContract" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="JQControls" Namespace="JQControls" TagPrefix="jq" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../../Controls/ContentHolder/Holder1.ascx" TagName="Holder1" TagPrefix="uc1" %>
<%@ Register Src="../../Controls/SelectAdvisorSurveyor.ascx" TagName="SelectAdvisorSurveyor"
    TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="../../Css/Master.css" rel="stylesheet" type="text/css" />
    <uc1:Holder1 ID="Holder2" runat="server" Title="ویرایش قرارداد">
        <ContentTemplate>
            <asp:UpdatePanel ID="Update1" runat="server" UpdateMode="Always">
                <ContentTemplate>
                    <div dir="rtl" style="font-family: Tahoma;">
                        <table class="style1">
                            <tr>
                                <td>
                                    <asp:Label ID="Label13" runat="server" Text="نوع جستجو"></asp:Label>
                                </td>
                                <td>
                                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" Height="17px"
                                        OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" RepeatDirection="Horizontal"
                                        Width="390px">
                                        <asp:ListItem Value="Family">بر اساس نام مشاور یا نقشه بردار</asp:ListItem>
                                        <asp:ListItem Value="Village">بر اساس نام روستا</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                        </table>
                        <asp:MultiView ID="MultiViewAdmin" runat="server">
                            <asp:View ID="View1" runat="server">
                                <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>--%>
                                <table dir="rtl">
                                    <tr>
                                        <td align="left" dir="rtl" width="100">
                                            <asp:Label ID="Label1" runat="server" Text="شهرستان:"></asp:Label>
                                        </td>
                                        <td align="right" dir="rtl" width="200">
                                            <asp:DropDownList ID="DropDownCity" runat="server" Width="150px">
                                            </asp:DropDownList>
                                            <asp:CascadingDropDown ID="CascadingDropDownCity" runat="server" Category="City"
                                                LoadingText="لطفا کمی صبر کنید" PromptText="شهرستان را انتخاب نمایید" ServiceMethod="GetCity"
                                                ServicePath="~/user/shares/DatabaseLocations.asmx" TargetControlID="DropDownCity">
                                            </asp:CascadingDropDown>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" dir="rtl" width="100">
                                            <asp:Label ID="Label2" runat="server" Text="بخش:"></asp:Label>
                                        </td>
                                        <td align="right" dir="rtl" width="200">
                                            <asp:DropDownList ID="DropDownBakhsh" runat="server" Width="150px">
                                            </asp:DropDownList>
                                            <asp:CascadingDropDown ID="CascadingDropDownBakhsh" runat="server" Category="Bakhsh"
                                                LoadingText="لطفا کمی صبر کنید" ParentControlID="DropDownCity" PromptText="بخش را انتخاب نمایید"
                                                ServiceMethod="GetBakhsh" ServicePath="~/user/shares/DatabaseLocations.asmx"
                                                TargetControlID="DropDownBakhsh">
                                            </asp:CascadingDropDown>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" dir="rtl" width="100">
                                            <asp:Label ID="Label3" runat="server" Text="دهستان:"></asp:Label>
                                        </td>
                                        <td align="right" dir="rtl" width="200">
                                            <asp:DropDownList ID="DropDownDehestan" runat="server" Width="150px">
                                            </asp:DropDownList>
                                            <asp:CascadingDropDown ID="CascadingDropDownDehestan" runat="server" Category="Dehestan"
                                                LoadingText="لطفا کمی صبر کنید" ParentControlID="DropDownBakhsh" PromptText="دهستان را انتخاب نمایید"
                                                ServiceMethod="GetDehestan" ServicePath="~/user/shares/DatabaseLocations.asmx"
                                                TargetControlID="DropDownDehestan">
                                            </asp:CascadingDropDown>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" dir="rtl" width="100">
                                            <asp:Label ID="Label4" runat="server" Text="آبادی:"></asp:Label>
                                        </td>
                                        <td align="right" dir="rtl" width="200">
                                            <asp:DropDownList ID="DropDownVillage1" runat="server" Width="150px" OnSelectedIndexChanged="DropDownVillage1_SelectedIndexChanged"
                                                AutoPostBack="true" OnTextChanged="DropDownVillage1_TextChanged">
                                            </asp:DropDownList>
                                            <asp:CascadingDropDown ID="CascadingDropDownVillage" runat="server" TargetControlID="DropDownVillage1"
                                                ParentControlID="DropDownDehestan" Category="Village" PromptText="آبادی را انتخاب نمایید"
                                                LoadingText="لطفا کمی صبر کنید" ServicePath="~/user/shares/DatabaseLocations.asmx"
                                                ServiceMethod="GetVillage">
                                            </asp:CascadingDropDown>
                                        </td>
                                    </tr>
                                </table>
                                <%-- </ContentTemplate>
    </asp:UpdatePanel>--%>
                            </asp:View>
                            <asp:View ID="View2" runat="server">
                                <table class="style1">
                                    <tr>
                                        <td class="style2">
                                            <asp:Label ID="Label10" runat="server" Text="نوع قراداد"></asp:Label>
                                        </td>
                                        <td colspan="3">
                                            <asp:RadioButtonList ID="RadioButtonListRole" runat="server" AutoPostBack="True"
                                                OnSelectedIndexChanged="RadioButtonListRole_SelectedIndexChanged" RepeatDirection="Horizontal"
                                                Width="496px">
                                                <asp:ListItem Value="Advisor">قرارداد مشاورین</asp:ListItem>
                                                <asp:ListItem Value="Surveyor">قرارداد نقشه برداران</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style2">
                                            &nbsp;
                                        </td>
                                        <td align="center" colspan="3">
                                            <asp:RadioButtonList ID="RadioButtonListAdvisors" runat="server" OnSelectedIndexChanged="RadioButtonListAdvisors_SelectedIndexChanged"
                                                RepeatDirection="Horizontal" Visible="False" Width="310px">
                                                <asp:ListItem Value="Advisorhoghooghi">مشاور حقوقی</asp:ListItem>
                                                <asp:ListItem Value="Advisorhaghighi">مشاور حقیقی</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style2">
                                            &nbsp;
                                        </td>
                                        <td align="center" colspan="3">
                                            <asp:RadioButtonList ID="RadioButtonListSurveyor" runat="server" RepeatDirection="Horizontal"
                                                Visible="False" Width="310px">
                                                <asp:ListItem Value="Advisorhoghooghi">نقشه بردار حقوقی</asp:ListItem>
                                                <asp:ListItem Value="Advisorhaghighi">نقشه بردار حقیقی</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style2">
                                            <asp:Label ID="Label12" runat="server" Text="نام خانوادگی" Width="100px"></asp:Label>
                                        </td>
                                        <td colspan="3">
                                            <asp:TextBox ID="TxtFamily" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style2">
                                            &nbsp;
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:Button ID="Button3" runat="server" CssClass="MainObject" OnClick="Button3_Click"
                                                Text="جستجو" Width="70px" />
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style2" colspan="4">
                                            <asp:GridView ID="GridViewUsers" runat="server" AutoGenerateColumns="False" BackColor="White"
                                                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" CssClass="MainObject"
                                                DataKeyNames="UserId" EmptyDataText="فرد مورد نظر یافت نشد" EnableModelValidation="True"
                                                OnRowCommand="GridViewUsers_RowCommand" OnSelectedIndexChanged="GridViewUsers_SelectedIndexChanged">
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                <Columns>
                                                    <asp:BoundField DataField="Name" HeaderText="نام / نام شرکت" ItemStyle-Width="140"
                                                        NullDisplayText="---">
                                                        <ItemStyle Width="140px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Family" HeaderText="نام خانوادگی / نام مدیرعامل" ItemStyle-Width="140"
                                                        NullDisplayText="---">
                                                        <ItemStyle Width="120px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Address" HeaderText="آدرس" ItemStyle-Width="100" NullDisplayText="---">
                                                        <ItemStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Tel" HeaderText="تلفن ثابت" ItemStyle-Width="100" NullDisplayText="---">
                                                        <ItemStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Mobile" HeaderText="تلفن همراه" ItemStyle-Width="100"
                                                        NullDisplayText="---">
                                                        <ItemStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="UserName" HeaderText="نام کاربری" ItemStyle-Width="100"
                                                        NullDisplayText="---">
                                                        <ItemStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Role" HeaderText="عنوان شغلی" ItemStyle-Width="100" NullDisplayText="---"
                                                        Visible="False">
                                                        <ItemStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="UserId" HeaderText="کد کاربری" Visible="False" />
                                                    <asp:ButtonField CommandName="Select" ItemStyle-Width="100" Text="انتخاب">
                                                        <ItemStyle Width="100px" />
                                                    </asp:ButtonField>
                                                </Columns>
                                                <EditRowStyle BackColor="#999999" />
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#CCCCFF" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View3" runat="server">
                                <table class="style1">
                                    <tr>
                                        <td>
                                            <asp:Label ID="Lab" runat="server"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:GridView ID="GridViewContracts" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                                CssClass="MainObject" DataKeyNames="ID" EnableModelValidation="True" ForeColor="#333333"
                                                GridLines="None" OnRowCommand="GridViewContracts_RowCommand" OnRowDataBound="GridViewContracts_RowDataBound"
                                                EmptyDataText="هیچ قرادادی برای فرد یا روستای مورد نظر شما یافت نشد.">
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                <Columns>
                                                    <asp:BoundField DataField="ContractNumber" HeaderText="شماره قرارداد" ItemStyle-Width="100"
                                                        ItemStyle-Height="50">
                                                        <ItemStyle Height="50px" Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="ContractDate" HeaderText="تاریخ قرارداد" ItemStyle-Width="100"
                                                        ItemStyle-Height="50">
                                                        <ItemStyle Height="50px" Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="AdvisorName" HeaderText="نام مشاور" ItemStyle-Width="100"
                                                        ItemStyle-Height="50">
                                                        <ItemStyle Height="50px" Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="ContractType" HeaderText="نوع قراداد" ItemStyle-Width="100"
                                                        ItemStyle-Height="50">
                                                        <ItemStyle Height="50px" Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="Year" HeaderText="سال قراداد" ItemStyle-Width="100" ItemStyle-Height="50">
                                                        <ItemStyle Height="50px" Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField HeaderText="روستا" />
                                                    <asp:BoundField HeaderText="دهستان" />
                                                    <asp:BoundField HeaderText="بخش" />
                                                    <asp:BoundField HeaderText="شهرستان" />
                                                    <asp:BoundField DataField="UserId" />
                                                    <asp:BoundField DataField="ID" Visible="False" />
                                                    <asp:BoundField DataField="VillageId" />
                                                    <asp:BoundField Visible="False" />
                                                    <asp:ButtonField CommandName="Select" Text="انتخاب" ItemStyle-Width="100" />
                                                    <%-- <asp:TemplateField HeaderText="بخش">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label>
                                </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="دهستان"></asp:TemplateField>
                                <asp:TemplateField HeaderText="شهرستان"></asp:TemplateField>--%>
                                                </Columns>
                                                <EditRowStyle BackColor="#999999" />
                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                <RowStyle BackColor="#CCCCFF" ForeColor="#333333" />
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <asp:Button ID="Button6" runat="server" OnClick="Button6_Click" Text="جستجوی مجدد"
                                                CssClass="MainObject" />
                                        </td>
                                    </tr>
                                </table>
                            </asp:View>
                            <asp:View ID="View4" runat="server">
                                <asp:Panel ID="Panelinfo" runat="server" BorderStyle="Solid" BorderWidth="2">
                                    <table class="style1">
                                        <tr>
                                            <td class="style2" width="25">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                <asp:Label ID="Label5" runat="server" Text="مشاور / نقشه بردار"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Button ID="Button9" runat="server" Font-Names="Tahoma" Text="تغییر مشاور / نقشه بردار" />
                                                <asp:Label ID="LblNameFamily" runat="server" Visible="false" Font-Size="Medium"></asp:Label>
                                            </td>
                                            <td>
                                                <cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" OnUnload="PopupControlExtender1_Dispose"
                                                    PopupControlID="PanelDestination" Position="Left" TargetControlID="Button9">
                                                </cc1:PopupControlExtender>
                                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                    <ContentTemplate>
                                                        <center>
                                                            <asp:Panel ID="PanelDestination" runat="server" BackColor="#99CCFF" BorderColor="#0099FF"
                                                                BorderStyle="Solid" BorderWidth="2">
                                                                <uc2:SelectAdvisorSurveyor ID="SelectAdvisorSurveyor1" runat="server" />
                                                            </asp:Panel>
                                                            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
                                                                DisplayAfter="1">
                                                                <ProgressTemplate>
                                                                    <img src="../../Pics/loading.gif" /></ProgressTemplate>
                                                            </asp:UpdateProgress>
                                                            &nbsp;&nbsp;
                                                        </center>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                <asp:Label ID="Label6" runat="server" Text="شماره قرارداد"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="TxtContractNumber" runat="server" Width="150px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtContractNumber"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                <asp:Label ID="Label141" runat="server" Text="سال  قرارداد"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="TxtYear" runat="server" Width="150px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxtYear"
                                                    ErrorMessage="*"></asp:RequiredFieldValidator>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                <asp:Label ID="Label16" runat="server" Text="عامل چهارم قرارداد"></asp:Label>
                                                <%--
                            <asp:TextBox ID="TextBox1" runat="server" Width="150px"></asp:TextBox>
                        <A onclick="javascript:displayDatePicker('ctl00_ContentPlaceHolder1_TextBox1',null,'dmy',null,'fa-IR')" href="javascript:;"><img src="../../Pics/cal.gif" /></A>
                                                --%><%--     <form id="form1" runat="server">--%>
                                                <%--   <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" Height="16px" 
                                    ontextchanged="TextBox1_TextChanged" Width="150px"></asp:TextBox>
                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                       ControlToValidate="TextBox1" ErrorMessage="*"></asp:RequiredFieldValidator>
                                          <br />
                    <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TextBox1"
                                                Mask="9999/99/99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus"
                                                OnInvalidCssClass="MaskedEditError" MaskType="Date" InputDirection="LeftToRight"
                                                ClearMaskOnLostFocus="false" AutoComplete="false" UserDateFormat="YearMonthDay" />
                                            
                                            <cc1:MaskedEditValidator ID="MaskedEditValidator2" IsValidEmpty="false" ControlExtender="MaskedEditExtender2"
                                                ControlToValidate="TextBox1" runat="server" 
                                                 MinimumValue="1380/01/01" Display="Static" 
                                                ValidationExpression="^(13[0-9]{2}|14[0-9]{2})\/(0[1-9]|1[012])\/([123]0|[012][1-9]|31)$" 
                                                ValidationGroup="0" />
                                <cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" 
                                    PopupControlID="Panel1" Position="Bottom" TargetControlID="TextBox1"></cc1:PopupControlExtender>
                                <br />
                                <div>
                                    <asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <center>
                                                    <KingOfDotNet:PersianCalendar ID="PersianCalendar1" runat="server" 
                                                        BackColor="#CCFFFF" BorderColor="#FFCC66" BorderWidth="1px" 
                                                        CssClass="MainObject" DayNameFormat="Full" EnableYearDropDownMenu="True" 
                                                        FirstDayOfWeek="Saturday" Font-Names="Verdana" Font-Size="8pt" 
                                                        ForeColor="Black" Height="200px" NextPrevFormat="CustomText" 
                                                        OnSelectionChanged="PersianCalendar1_SelectionChanged" 
                                                        SelectedDate="2011-04-22" SelectedPersianDateFormat="Short" 
                                                        SelectionMode="DayWeekMonth" TitleFormat="MonthYear" VisibleDate="2011-04-22" 
                                                        Width="220px"><WeekendDayStyle CssClass="MainObject" ForeColor="#99CCFF" /><SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" /><DayStyle CssClass="MainObject" /><TodayDayStyle BackColor="#0099FF" ForeColor="White" /><SelectorStyle BackColor="#0099FF" CssClass="MainObject" ForeColor="Black" /><OtherMonthDayStyle CssClass="MainObject" ForeColor="#0099FF" /><NextPrevStyle CssClass="MainObject" Font-Size="9pt" ForeColor="Black" /><DayHeaderStyle BackColor="#66CCFF" CssClass="MainObject" Font-Bold="True" Height="1px" /><TitleStyle BackColor="#0066CC" CssClass="MainObject" Font-Bold="True" Font-Names="tahoma" 
                                                        Font-Size="9pt" ForeColor="Black" /></KingOfDotNet:PersianCalendar>
                                                    <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                                                        AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="1">
                                                        <progresstemplate>
                   <img src="../../Pics/loading.gif" />
                </progresstemplate>
                                                    </asp:UpdateProgress>
                                                    &nbsp;&nbsp;
                                                </center>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </asp:Panel>
                                    &nbsp; &nbsp;
                                </div>--%>
                                            </td>
                                            <td>
                                                <%--
                            <asp:TextBox ID="TextBox1" runat="server" Width="150px"></asp:TextBox>
                        <A onclick="javascript:displayDatePicker('ctl00_ContentPlaceHolder1_TextBox1',null,'dmy',null,'fa-IR')" href="javascript:;"><img src="../../Pics/cal.gif" /></A>
                                                --%><%--     <form id="form1" runat="server">--%>
                                                <%--   <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" Height="16px" 
                                    ontextchanged="TextBox1_TextChanged" Width="150px"></asp:TextBox>
                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                       ControlToValidate="TextBox1" ErrorMessage="*"></asp:RequiredFieldValidator>
                                          <br />
                    <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TextBox1"
                                                Mask="9999/99/99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus"
                                                OnInvalidCssClass="MaskedEditError" MaskType="Date" InputDirection="LeftToRight"
                                                ClearMaskOnLostFocus="false" AutoComplete="false" UserDateFormat="YearMonthDay" />
                                            
                                            <cc1:MaskedEditValidator ID="MaskedEditValidator2" IsValidEmpty="false" ControlExtender="MaskedEditExtender2"
                                                ControlToValidate="TextBox1" runat="server" 
                                                 MinimumValue="1380/01/01" Display="Static" 
                                                ValidationExpression="^(13[0-9]{2}|14[0-9]{2})\/(0[1-9]|1[012])\/([123]0|[012][1-9]|31)$" 
                                                ValidationGroup="0" />
                                <cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" 
                                    PopupControlID="Panel1" Position="Bottom" TargetControlID="TextBox1"></cc1:PopupControlExtender>
                                <br />
                                <div>
                                    <asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <center>
                                                    <KingOfDotNet:PersianCalendar ID="PersianCalendar1" runat="server" 
                                                        BackColor="#CCFFFF" BorderColor="#FFCC66" BorderWidth="1px" 
                                                        CssClass="MainObject" DayNameFormat="Full" EnableYearDropDownMenu="True" 
                                                        FirstDayOfWeek="Saturday" Font-Names="Verdana" Font-Size="8pt" 
                                                        ForeColor="Black" Height="200px" NextPrevFormat="CustomText" 
                                                        OnSelectionChanged="PersianCalendar1_SelectionChanged" 
                                                        SelectedDate="2011-04-22" SelectedPersianDateFormat="Short" 
                                                        SelectionMode="DayWeekMonth" TitleFormat="MonthYear" VisibleDate="2011-04-22" 
                                                        Width="220px"><WeekendDayStyle CssClass="MainObject" ForeColor="#99CCFF" /><SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" /><DayStyle CssClass="MainObject" /><TodayDayStyle BackColor="#0099FF" ForeColor="White" /><SelectorStyle BackColor="#0099FF" CssClass="MainObject" ForeColor="Black" /><OtherMonthDayStyle CssClass="MainObject" ForeColor="#0099FF" /><NextPrevStyle CssClass="MainObject" Font-Size="9pt" ForeColor="Black" /><DayHeaderStyle BackColor="#66CCFF" CssClass="MainObject" Font-Bold="True" Height="1px" /><TitleStyle BackColor="#0066CC" CssClass="MainObject" Font-Bold="True" Font-Names="tahoma" 
                                                        Font-Size="9pt" ForeColor="Black" /></KingOfDotNet:PersianCalendar>
                                                    <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                                                        AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="1">
                                                        <progresstemplate>
                   <img src="../../Pics/loading.gif" />
                </progresstemplate>
                                                    </asp:UpdateProgress>
                                                    &nbsp;&nbsp;
                                                </center>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </asp:Panel>
                                    &nbsp; &nbsp;
                                </div>--%><%-- </form>--%>
                                                <asp:DropDownList ID="DropDownListFourthFactor" runat="server">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                <asp:Label ID="Label91" runat="server" Text="تاریخ قرارداد"></asp:Label>
                                                <jq:JQLoader ID="JQLoader1" runat="server" Theme="Vader" />
                                            </td>
                                            <td>
                                                <div dir="rtl">
                                                    <jq:JQDatePicker ID="JQDatePicker1" runat="server" ChangeMonth="True" ChangeYear="True"
                                                        Regional="fa" Width="150px"></jq:JQDatePicker>
                                                </div>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="3">
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="3" height="90">
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" align="center" height="100">
                                                &nbsp;
                                            </td>
                                            <td align="right" class="style2" colspan="3" height="100">
                                                <asp:Label ID="Lblstatus1" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" class="style2" height="25">
                                                &nbsp;
                                            </td>
                                            <td align="center" class="style2" colspan="2" height="25">
                                                <asp:Label ID="Label7" runat="server" CssClass="notice" Text="تاریخ را باید به صورت (سال/ ماه / روز )وارد کنید "></asp:Label>
                                            </td>
                                            <td align="center" class="style2" height="25">
                                                &nbsp;&nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" align="center" height="25">
                                                &nbsp;
                                            </td>
                                            <td class="style2" align="center" colspan="2" height="25">
                                                &nbsp;&nbsp;<asp:Button ID="ButtonSaveInfo" runat="server" CssClass="mainobject"
                                                    Font-Names="Tahoma" Height="30px" OnClick="ButtonSaveInfo_Click" Text="ثبت اطلاعات پایه قرارداد"
                                                    Width="147px" />
                                            </td>
                                            <td align="center" class="style2" height="25">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" class="style2" height="25">
                                                &nbsp;
                                            </td>
                                            <td align="center" class="style2" colspan="2" height="25">
                                                &nbsp;
                                            </td>
                                            <td align="center" class="style2" height="25">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" class="style2" height="25">
                                                &nbsp;
                                            </td>
                                            <td align="center" class="style2" colspan="2" height="25">
                                                <asp:Button ID="Button8" runat="server" Font-Names="Tahoma" OnClick="Button8_Click"
                                                    Text="جستجوی مجدد" />
                                            </td>
                                            <td align="center" class="style2" height="25">
                                                <asp:Button ID="Button7" runat="server" Font-Names="Tahoma" OnClick="Button7_Click"
                                                    Text="بازگشت به لیست قرادادها" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <br />
                                <asp:Panel ID="Panelvillages" runat="server" BorderStyle="Solid" BorderWidth="2">
                                    <table>
                                        <tr>
                                            <td class="style2">
                                                <asp:Label ID="Label8" runat="server" Text="شهرستان:"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="DropDownListCity1" runat="server" Width="150px">
                                                </asp:DropDownList>
                                                <asp:CascadingDropDown ID="CascadingDropDown1" runat="server" Category="City" LoadingText="لطفا کمی صبر کنید"
                                                    PromptText="شهرستان را انتخاب نمایید" ServiceMethod="GetCity" ServicePath="~/user/shares/DatabaseLocations.asmx"
                                                    TargetControlID="DropDownListCity1">
                                                </asp:CascadingDropDown>
                                            </td>
                                            <td colspan="3">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                <asp:Label ID="Label151" runat="server" Text="بخش:"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="DropDownListBakhsh1" runat="server" Width="150px">
                                                </asp:DropDownList>
                                                <asp:CascadingDropDown ID="CascadingDropDown2" runat="server" Category="Bakhsh" LoadingText="لطفا کمی صبر کنید"
                                                    ParentControlID="DropDownListCity1" PromptText="بخش را انتخاب نمایید" ServiceMethod="GetBakhsh"
                                                    ServicePath="~/user/shares/DatabaseLocations.asmx" TargetControlID="DropDownListBakhsh1">
                                                </asp:CascadingDropDown>
                                            </td>
                                            <td colspan="3">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                <asp:Label ID="Label911" runat="server" Text="دهستان:"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="DropDownListdehestan1" runat="server" Width="150px">
                                                </asp:DropDownList>
                                                <asp:CascadingDropDown ID="CascadingDropDown3" runat="server" Category="Dehestan"
                                                    LoadingText="لطفا کمی صبر کنید" ParentControlID="DropDownListBakhsh1" PromptText="دهستان را انتخاب نمایید"
                                                    ServiceMethod="GetDehestan" ServicePath="~/user/shares/DatabaseLocations.asmx"
                                                    TargetControlID="DropDownListdehestan1">
                                                </asp:CascadingDropDown>
                                            </td>
                                            <td colspan="3">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                <asp:Label ID="Label11" runat="server" Text="آبادی:"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="DropDownvillage" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropDownVillage_SelectedIndexChanged"
                                                    Width="150px">
                                                </asp:DropDownList>
                                                <asp:CascadingDropDown ID="CascadingDropDown4" runat="server" Category="Village"
                                                    LoadingText="لطفا کمی صبر کنید" ParentControlID="DropDownListdehestan1" PromptText="آبادی را انتخاب نمایید"
                                                    ServiceMethod="GetVillage" ServicePath="~/user/shares/DatabaseLocations.asmx"
                                                    TargetControlID="DropDownvillage">
                                                </asp:CascadingDropDown>
                                            </td>
                                            <td colspan="3">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="5">
                                                <asp:GridView ID="GridViewVillageDetail" runat="server" AutoGenerateColumns="False"
                                                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                                    CellPadding="3" CssClass="MainObject" EnableModelValidation="True">
                                                    <Columns>
                                                        <asp:BoundField DataField="ID" HeaderText="ID" ItemStyle-Width="100" Visible="False" />
                                                        <asp:BoundField DataField="VillageCode" HeaderText="کد آبادی" ItemStyle-Width="100" />
                                                        <asp:BoundField DataField="Name" HeaderText="نام روستا" ItemStyle-Width="150" />
                                                        <asp:BoundField DataField="Khanevar" HeaderText="تعداد خانوار" ItemStyle-Width="100" />
                                                        <asp:BoundField DataField="Population" HeaderText="جمعیت" ItemStyle-Width="100" />
                                                    </Columns>
                                                    <FooterStyle BackColor="White" ForeColor="#000066" />
                                                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                                    <RowStyle ForeColor="#000066" />
                                                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:LinkButton ID="LinkButtonDelete" runat="server" CausesValidation="False" OnClick="LinkButtonDelete_Click">حذف روستا</asp:LinkButton>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="LinkButtonInsert" runat="server" CausesValidation="False" OnClick="LinkButtonInsert_Click">اضاقه کردن روستا</asp:LinkButton>
                                            </td>
                                            <td colspan="3">
                                                <asp:LinkButton ID="LinkButtonedit" runat="server" OnClick="LinkButtonedit_Click">ویرایش روستا</asp:LinkButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label1411" runat="server" Text="لیست روستاهای قرارداد"></asp:Label>
                                                <br />
                                                <br />
                                            </td>
                                            <td>
                                                <asp:ListBox ID="ListVillages" runat="server" CssClass="MainObject" Height="163px"
                                                    OnSelectedIndexChanged="ListVillages_SelectedIndexChanged" Width="158px"></asp:ListBox>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td align="center">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="5">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" class="style2" colspan="5">
                                                <asp:Label ID="Lblstatus" runat="server"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="5">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="5" align="center">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="5" align="center">
                                                <asp:Label ID="Label1412" runat="server" CssClass="error" Text="حذف روستا از قرارداد همراه با حذف تمامی مراحل و فایل های پیوستی به آنها صورت میپذیرد"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="style2" colspan="5" align="center">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </asp:View>
                        </asp:MultiView>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
    </uc1:Holder1>
</asp:Content>
